import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {SellAdPositionSaveComponent} from './sell-ad-position-save/sell-ad-position-save.component';
import {SellAdPositionComponent} from './sell-ad-position/sell-ad-position.component';
import {SellAdSaveComponent} from './sell-ad-save/sell-ad-save.component';
import {SellAdComponent} from './sell-ad/sell-ad.component';

import {SellCouponComponent} from './sell-coupon/sell-coupon.component';
import {SellDetailComponent} from './sell-detail/sell-detail.component';
import {SellInviteSaveComponent} from './sell-invite-save/sell-invite-save.component';
import {SellInviteComponent} from './sell-invite/sell-invite.component';
import {SellSaveComponent} from './sell-save/sell-save.component';
import {SellUserCouponComponent} from './sell-user-coupon/sell-user-coupon.component';
import {SellCouponbagManageComponent} from './sell-couponbag-manage/sell-couponbag-manage.component';
import {SellCouponbagHandleComponent} from './sell-couponbag-handle/sell-couponbag-handle.component';
import {DirectDescentManageComponent} from './sell-promotion-manage/direct-descent-manage/direct-descent-manage.component';
import {DirectDescentRecordComponent} from './sell-promotion-manage/direct-descent-record/direct-descent-record.component';
import {DirectDescentDetailsComponent} from './sell-promotion-manage/direct-descent-details/direct-descent-details.component';
import {DirectDescentAddeditComponent} from './sell-promotion-manage/direct-descent-addedit/direct-descent-addedit.component';
import {DeliveryActivitiesComponent} from './sell-delivery-activities/sell-delivery-activities.component';
import {OrderLotteryListComponent} from './sell-luckdraw-manage/order-lottery-list/order-lottery-list.component';
import {OrderLotteryConfigComponent} from './sell-luckdraw-manage/order-lottery-config/order-lottery-config.component';
import {OrderLotteryRecordComponent} from './sell-luckdraw-manage/order-lottery-record/order-lottery-record.component';
import {SellChangecodeRecordComponent} from './sell-changecode-record/sell-changecode-record.component';
import {PageDecorationComponent} from './page-decoration/page-decoration.component';
import {DecorationComponent} from './page-decoration/decoration/decoration.component';

const routes: Routes = [
  // 默认访问
  {path: '', redirectTo: 'coupon', pathMatch: 'full'},
  // 优惠券列表
  {
    path: 'coupon',
    component: SellCouponComponent,
    data: {breadcrumb: '优惠券', keep: true},
    children: [],
  },
  // 新增&&编辑 优惠券
  {
    path: 'save/:id',
    component: SellSaveComponent,
    data: {breadcrumb: '新增&&编辑优惠券'},
  },
  // 查看优惠券详情
  {
    path: 'couponDetail/:id',
    component: SellDetailComponent,
    data: {breadcrumb: '查看优惠券'},
  },
  // 用户优惠券
  {
    path: 'userCoupon',
    component: SellUserCouponComponent,
    data: {breadcrumb: '用户优惠券'},
  },
  // 优惠券包管理
  {
    path: 'couponbagManage',
    component: SellCouponbagManageComponent,
    data: {breadcrumb: '优惠券包管理'},
  },
  // 新增优惠券包
  {
    path: 'couponbagHandle',
    component: SellCouponbagHandleComponent,
    data: {breadcrumb: '新增优惠券包'},
  },
  //新增广告项
  {
    path: 'adSave',
    component: SellAdSaveComponent,
    data: {breadcrumb: '新增广告项'}
  },
  // 广告管理
  {
    path: 'ad',
    component: SellAdComponent,
    data: {breadcrumb: '广告管理'}
  },
  // 广告位管理
  {
    path: 'adPosition',
    component: SellAdPositionComponent,
    data: {breadcrumb: '广告位管理'}
  },
  // 新增广告位
  {
    path: 'adPositionSave',
    component: SellAdPositionSaveComponent,
    data: {breadcrumb: '新增广告位'}
  },
  // 邀请有礼
  {
    path: 'invite',
    component: SellInviteComponent,
    data: {breadcrumb: '邀请有礼'}
  },
  // 邀请有礼活动配置
  {
    path: 'inviteSave',
    component: SellInviteSaveComponent,
    data: {breadcrumb: '邀请有礼活动配置'}
  },
  // 直降活动管理
  {
    path: 'descentManage',
    component: DirectDescentManageComponent,
    data: {breadcrumb: '直降活动管理'}
  },
  // 直降记录
  {
    path: 'descentRecord',
    component: DirectDescentRecordComponent,
    data: {breadcrumb: '直降记录'}
  },
  // 直降促销详情
  {
    path: 'descentDetails/:id',
    component: DirectDescentDetailsComponent,
    data: {breadcrumb: '直降促销详情'}
  },
  // 新增编辑 直降促销活动
  {
    path: 'descentAddedit',
    component: DirectDescentAddeditComponent,
    data: {breadcrumb: '直降促销活动信息'}
  },
  // 送数据线活动
  {
    path: 'deliveryActivities',
    component: DeliveryActivitiesComponent,
    data: {breadcrumb: '送数据线活动'}
  },
  // 下单抽奖管理
  {
    path: 'orderLotteryList',
    component: OrderLotteryListComponent,
    data: {breadcrumb: '下单抽奖管理'}
  },
  // 下单抽奖配置
  {
    path: 'orderLotteryConfig',
    component: OrderLotteryConfigComponent,
    data: {breadcrumb: '下单抽奖配置'}
  },
  // 下单抽奖记录
  {
    path: 'orderLotteryRecord',
    component: OrderLotteryRecordComponent,
    data: {breadcrumb: '下单抽奖记录'}
  },
  // 兑换码记录
  {
    path: 'sell-changecode-record',
    component: SellChangecodeRecordComponent,
    data: {breadcrumb: '兑换码记录'}
  },
  {path: 'pageDecoration', component: PageDecorationComponent},
  {path: 'editDecoration', component: DecorationComponent},
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class SellRoutingModule {
}
